import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import './index.css';

// 处理移动端 hover
function hasTouch() {
  return 'ontouchstart' in document.documentElement
         || navigator.maxTouchPoints > 0
         || navigator.msMaxTouchPoints > 0;
}

if (hasTouch()) {
  document.getElementById('root').classList.add('touch');
}
else {
  document.getElementById('root').classList.add('no-touch');
}

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  // <React.StrictMode>
      <App />
  // </React.StrictMode>
);
